<template>
  <el-dialog :visible.sync="dialog" title="查看流转信息" append-to-body width="85%" @open="open">
    <el-table v-loading="loading" ref="table" :data="data" size="small" style="width: 100%;" border>
      <el-table-column prop="histIns.activityName" label="执行环节"/>
      <el-table-column prop="assigneeName" label="执行人"/>
      <el-table-column prop="histIns.startTime" label="开始时间">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.histIns.startTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="histIns.endTime" label="结束时间">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.histIns.endTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="comment" label="提交意见"/>
      <el-table-column prop="durationTime" label="任务历时"/>
    </el-table>
    <!--分页组件-->
    <el-pagination
      :total="total"
      :current-page="page + 1"
      style="margin-top: 8px;"
      layout="total, prev, pager, next, sizes"
      @size-change="sizeChange"
      @current-change="pageChange"/>
  </el-dialog>
</template>

<script>
  import initData from '@/mixins/initData'
  import {parseTime} from '@/utils/index'

  export default {
    name: "TransferInfo",
    props: {
      procInsId: {
        type: String,
        required: true
      }
    },
    mixins: [initData],
    data() {
      return {
        dialog: false
      }
    },
    methods: {
      parseTime,
      open() {
        this.init()
      },
      beforeInit() {
        this.url = 'flowTask/histoicFlow'
        this.params = {page: this.page, size: this.size, procInsId: this.procInsId}
        return true
      },
    }
  }
</script>

<style scoped>

</style>
